<div class="panel panel-default"><!-- Add class "collapsed" to minimize the panel -->
    <div class="panel-heading">
        <h3 class="panel-title">工单信息</h3>
        <div class="panel-options">
            <button type="button"
                    class="btn btn-icon btn-turquoise btn-xs pull-right" {{action 'saveWorkorder'}}>
                <i class="fa-save"></i>
                <span>保存工单</span>
            </button>
        </div>
    </div>
    <div class="panel-body">
        <div class="row">
          {{#if editMode}}
              <form class="form-horizontal">
                  <div class="form-group input-group-xs">
                      <label class="col-xs-3 col-sm-2 control-label">来电号码:</label>
                      <div class="col-xs-6 col-sm-10 form-control-static">{{phoneNumber}}</div>
                  </div>
                  <div class="form-group input-group-xs">
                      <label class="col-xs-3 col-sm-2 control-label">客户名称:</label>
                      <div class="col-xs-6 col-sm-8">
                        {{select-2  content=customers value=customerRel multiple=false placeholder="请选择客户" }}
                      </div>
                      <div class="col-xs-3 col-sm-2">
                          <i class="fa-plus-circle"></i>
                          <span>添加客户</span>
                      </div>
                  </div>
                {{input type="hidden" value=customer.id }}
                  <div class="form-group input-group-xs">
                      <label class="col-xs-3 col-sm-2 control-label">工单主题:</label>
                      <div class="col-xs-6 col-sm-10">
                        {{input type="text" value=workorder.title class="form-control" placeholder="输入工单主题"}}
                      </div>
                  </div>
                  <div class="form-group input-group-xs">
                      <label class="col-xs-6 col-sm-2 control-label">工单描述:</label>
                      <div class="col-xs-6 col-sm-10">
                        {{textarea type="text" rows=5 value=workorder.desc class="form-control" placeholder="输入工单描述"}}
                      </div>
                  </div>
              </form>
          {{else}}
              <form class="form-horizontal reduce-spacing col-sm-10">
                  <div class="form-group input-group-xs">
                      <label class="col-xs-3 col-sm-2 control-label">工单标题:</label>
                      <div class="col-xs-6 col-sm-10 form-control-static">{{workorder.title}}</div>
                  </div>
                  <div class="form-group input-group-xs">
                      <label class="col-xs-6 col-sm-2 control-label">工单内容:</label>
                      <div class="col-xs-6 col-sm-10 form-control-static">{{workorder.desc}}</div>
                  </div>
              </form>
              <div class="col-sm-2 pull-right">
                  <button type="button" class="btn btn-icon btn-turquoise btn-xs pull-right" {{action 'editCustomer' customer}}>
                      <i class="fa-edit"></i>
                      <span>编辑</span>
                  </button>
              </div>
          {{/if}}
        </div>
    </div>
</div>
